{extend name="public:common_edit" /}

{block name="main"}
<link rel="stylesheet" href="__FONT__/css/font-awesome.min.css" />

<style>
    .modal.in .modal-dialog{
        margin-top: 10%;
        z-index: 10000;
    }
    .modal-backdrop{
        z-index: 0;
    }
</style>
<!--body wrapper start-->
<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb panel">
                <li><a href="{:url('Index/index')}"><i class="fa fa-home"></i> 控制台</a></li>
                <li><a href="{:url('index')}">权限管理</a></li>
                <li class="active">权限管理</li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>
    <ul id="myTab" class="nav nav-tabs">
        <li class="active"><a href="#home" data-toggle="tab">用户组列表</a></li>
        <li><a href="javascript:;" onclick="add()">用户组添加</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
        <div class="tab-pane fade in active" id="home">
            <table class="table table-striped table-bordered table-hover table-condensed">
                <tr>
                    <th width="10%"> 搜索用户名：</th>
                    <td>
                        <form class="form-inline" action="">
                            <input class="form-control" type="text" name="user_name"
                                                                   value="{$Think.get.user_name}"> <input class="btn btn-success"
                                                                                                         type="submit" value="搜索">
                        </form>
                    </td>
                </tr>
            </table>
            <table class="table table-striped table-bordered table-hover table-condensed">
                <tr>
                    <th width="10%">用户名</th>
                    <th>操作</th>
                </tr>
                {if $user_data}
                {foreach $user_data as $v}
                <tr>
                    <th>{$v['user_name']}</th>
                    <td>

                        {in name="$v['id']" value="$uids"}
                        已经是{$group_name}
                        {else/}
                        <a href="{:url('Rule/add_user_to_group',array('uid'=>$v['id'],'group_id'=>$group_id))}">设为{$group_name}</a>
                        {/in}
                    </td>
                </tr>
                {/foreach}
                {else}
                <tr>
                    <td colspan="2">暂无数据</td>
                </tr>
                {/if}
            </table>
        </div>
    </div>
</div>
<script>

</script>
<!--body wrapper end-->
{/block}
